<template>
  <div class="seed-source-resource-library">
    <SeedSourceMovieTable v-if="SeedSourceMovieTableVisible" />
    <ExternalMovieTable v-if="externalMovieTableVisible" />
    <ExternalEssayTable v-if="externalEssayTableVisible" />
    <ExternalAtlasTable v-if="externalAtlasTableVisible" />
  </div>
</template>

<script lang="ts" setup name="SeedSourceResourceLibrary">
import SeedSourceMovieTable from './components/SeedSourceMovieTable.vue'
import ExternalMovieTable from './components/ExternalMovieTable.vue'
import ExternalEssayTable from './components/ExternalEssayTable.vue'
import ExternalAtlasTable from './components/ExternalAtlasTable.vue'
import { useRoute } from 'vue-router'
import { computed } from 'vue'

const route = useRoute()
const { resource_type, content_type } = route.query
const _resourcesType = Number(resource_type)
const _resourcesContentType = Number(content_type)

// 种源资源 tableVisible
const SeedSourceMovieTableVisible = computed(() => _resourcesType === 1 && _resourcesContentType === 1)

// 外部资源－影片 tableVisible
const externalMovieTableVisible = computed(() => _resourcesType === 2 && _resourcesContentType === 1)

// 外部资源－图集 tableVisible
const externalEssayTableVisible = computed(() => _resourcesType === 2 && _resourcesContentType === 2)

// 外部资源－文章 tableVisible
const externalAtlasTableVisible = computed(() => _resourcesType === 2 && _resourcesContentType === 3)
</script>

<!-- <style lang="less" scoped>
.seed-source-resource-library {
}
</style> -->
